// https://www.hackerrank.com/challenges/even-tree#include<stdio.h>int g[1001][1001];int cnt[1001];int was[1001];int a,b,i,result=0;void dfs(int x, int n, int m);int main () {        int n,m;    scanf("%d %d",&n,&m);        for ( i=0 ; i<m ; i++) {        scanf("%d %d",&a,&b);                g[a][b]=1;        g[b][a]=1;            }    dfs(1,n,m);        for (i=1; i<=n ; i++) {        if (cnt[i]%2==0 && cnt[i] != 0) {            result++;        }    }    //    for (i=1; i<=n; i++) {//        printf("%d ",cnt[i]);//    }        printf("%d",result-1);    }void dfs(int x, int n, int m){        was[x] = 1;    int j;    for (j=1; j<=n ; j++)        if (g[x][j] == 1 && was[j]==0 )            dfs(j,n,m);        for (j=1; j<=n ; j++)        if (g[x][j]==1)            cnt[x]+=cnt[j];        cnt[x]++;}